<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/bootcdn/BootCDN/ajax/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
	<style>
		body {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			padding: 6px;
			background-color: rgb(243, 243, 244);
			font-size:13px;
			overflow: hidden;
		}
		.inn-head {
			position: absolute;
			top: 6px;
			left: 0;
			right: 0;
			height: 44px;
			z-index: 1;
		}
		.inn-content {
			position: absolute;
			top: 40px;
			left: 6px;
			right: 6px;
			bottom: 6px;
			background-color: rgb(255, 255, 255);
			overflow: hidden;
			z-index: 2;
		}
		.inn-head > ul {
			display: block;
			margin-top: 6px;
			margin-left: 6px;
			padding: 0;
		}
		.inn-head > ul > li {
			display: inline-block;
			margin: 0;
			list-style: none;
			color: rgb(169, 169, 169);
		}
		.inn-head > ul > li > label {
			padding: 12px 18px;
			cursor: default;
		}
		.inn-head > ul > li > label:hover {
			color: rgb(33, 33, 33);
			cursor: pointer;
		}
		.active-inn-label {
			background-color: rgb(255, 255, 255);
			color: rgb(33, 33, 33);
			cursor: default;
		}
		.active-inn-label:hover {
			cursor: default;
		}
	</style>
</head>
<body>
	<div class="inn-head">
		<ul>
		    <shiro:hasPermission name="scrm_auto_market_page_system_pre">
			<li><label data-url="<%=path%>/view/automarket/systemList">系统预制</label></li>
			</shiro:hasPermission>
			<shiro:hasPermission name="scrm_auto_market_custom_create">
			<li><label data-url="<%=path%>/view/automarket/curtain">自定义创建</label></li>
			</shiro:hasPermission>
			<shiro:hasPermission name="scrm_auto_market_custom_list">
			<li><label data-url="<%=path%>/view/automarket/customList">自定义列表</label></li>
			</shiro:hasPermission>
		</ul>
	</div>
	<div class="inn-content">
	 <shiro:hasPermission name="scrm_auto_market_page_system_pre">
			<iframe id="innerFrame" src="<%=path%>/view/automarket/systemList" style="width:100%; height:100%; padding:0; margin:0; border-width:0; overflow:hidden;"></iframe>
	 </shiro:hasPermission>
	</div>
	<script>
		$(function(){
			$(".inn-head").off("click", "label");
			$(".inn-head").on("click", "label", function(){
				var $cur = $(this);
				var $li = $cur.parents(" li");
				$li.siblings().find("label").removeClass("active-inn-label");
				$cur.addClass("active-inn-label");
				$("#innerFrame").attr("src", $cur.data("url"));
			});
			$("div.inn-head>ul").find("li:eq(0)>label").click();
		});
	</script>
</body>
</html>
